package gupaoedu.hungrySingleton;

/**
 * gupaoedu.hungrySingleton
 * linwenjie
 * 2019-06-18
 * 懒汉模式
 */
public class HugrySingleton {
    private HugrySingleton(){

    }

    private static final HugrySingleton HUGRY_SINGLETON;
    static {
        HUGRY_SINGLETON = new HugrySingleton();
    }

    //获取对象
    public static HugrySingleton GetInstance(){
        return HUGRY_SINGLETON;
    }
}
